package com.foreknow.mapper;

import com.foreknow.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    /**
     * 登录
     * @param userName
     * @param password
     * @return
     */
    @Select("select * from user where UserName=#{userName} and Password=#{password}")
    public User login(String userName, String password);

    /**
     * 显示用户列表
     * @param deptId
     * @param registLeId
     * @return
     */
    public List<User> getUserList(Integer deptCategoryId,Integer deptId, Integer registLeId);

    /**
     * id查询用户
     * @param UserId
     * @return
     */
    @Select("select * from user where ID=#{UserId}")
    public User getUserById(String UserId);
}
